import request from "@/utils/request"

const project = {
  // 新增项目基本信息
  delete (id) {
    return request.post(`/kpzh/project/delete/${id}`)
  }, list (params) {
    return request.get("/kpzh/project/list", { params })
  },
  // 项目基本信息详情
  get (id) {
    return request.get(`/kpzh/project/detail/${id}`)
  },
  getAll (id) {
    return request.get(`/kpzh/project/allDetail/${id}`);
  },

  // 申报列表
  declareList (params) {
    return request.get("/kpzh/project/declareList", { params })
  },

  // 1.2.2.我的申报列表
  myDeclareList (params) {
    return request.get("/kpzh/project/myDeclareList", { params })
  },

  // 1.3.1.实施列表
  implementList (params) {
    return request.get("/kpzh/project/implementList", { params })
  },

  // 1.3.2.我的实施列表
  myImplementList (params) {
    return request.get("/kpzh/project/myImplementList", { params })
  },

  myList (params) {
    return request.get("/kpzh/project/myList", { params })
  },


  // 新增项目基本信息
  add (data) {
    return request.post("/kpzh/project/add", data)
  },
  // 修改项目基本信息
  update (data) {
    return request.post("/kpzh/project/update", data)
  },
  // 计划类别list
  planCategoryList () {
    return request.get(`/kpzh/planCategory/list`);
  },
  // 新增实施背景及必要性
  projectBackgroundAdd (data) {
    return request.post("/kpzh/projectBackground/add", data)
  },
  // 修改实施背景及必要性
  projectBackgrounUpdate (data) {
    return request.post("/kpzh/projectBackground/update", data)
  },
  // 1.2.7.实施背景及必要性详情
  projectBackgroundDetail (id) {
    return request.get(`/kpzh/projectBackground/detail/${id}`)
  },
  // 1.2.8.根据项目id获取实施背景及必要性详情
  projectBackgroundDetailGetByProjectId (projectId) {
    return request.get(`/kpzh/projectBackground/getByProjectId/${projectId}`)
  },


  // 1.2.9.新增依托工程（项目）概述
  projectOverviewAdd (data) {
    return request.post("/kpzh/projectOverview/add", data)
  },
  // 1.2.10.修改依托工程（项目）概述
  projectOverviewUpdate (data) {
    return request.post("/kpzh/projectOverview/update", data)
  },
  // 1.2.11.依托工程（项目）概述详情
  projectOverviewDetail (id) {
    return request.get(`/kpzh/projectOverview/detail/${id}`)
  },
  // 1.2.12.根据项目id获取依托工程（项目）概述详情
  projectOverviewDetailGetByProjectId (projectId) {
    return request.get(`/kpzh/projectOverview/getByProjectId/${projectId}`)
  },


  // 新增前期工作和科研基础
  projectWorkBasisAdd (data) {
    return request.post("/kpzh/projectWorkBasis/add", data)
  },
  // 修改前期工作和科研基础
  projectWorkBasisUpdate (data) {
    return request.post("/kpzh/projectWorkBasis/update", data)
  },
  // 1.2.15.前期工作和科研基础详情
  projectWorkBasisDetail (id) {
    return request.get(`/kpzh/projectWorkBasis/detail/${id}`)
  },
  // 1.2.12.根据项目id获取依托工程（项目）概述详情
  projectWorkBasisDetailGetByProjectId (projectId) {
    return request.get(`/kpzh/projectWorkBasis/getByProjectId/${projectId}`)
  },

  // 新增推广技术的主要内容与规模
  projectContentScaleAdd (data) {
    return request.post("/kpzh/projectContentScale/add", data)
  },
  // 修改推广技术的主要内容与规模
  projectContentScaleUpdate (data) {
    return request.post("/kpzh/projectContentScale/update", data)
  },
  // 根据id获取推广技术的主要内容与规模详情
  projectContentScaleDetail (id) {
    return request.get(`/kpzh/projectContentScale/detail/${id}`)
  },
  // 1.2.20.根据项目id获取推广技术的主要内容与规模详情
  projectContentScaleDetailGetByProjectId (projectId) {
    return request.get(`/kpzh/projectContentScale/getByProjectId/${projectId}`)
  },
  // 1.2.20.根据项目id获取推广技术的主要内容与规模详情
  PlanDetailGetByProjectIdAndPhaseType (projectId, phaseType) {
    return request.get(`/kpzh/projectResearchPlan/getByProjectId/${projectId}/${phaseType}`)
  },


  // 1.2.21.新增（修改）预期成果及表达形式
  projectExpectResultsAddOrUpdate (data) {
    return request.post("/kpzh/projectExpectResults/addList", data)
  },
  // 1.2.20.根据项目id获取推广技术的主要内容与规模详情
  projectExpectResultsDetailGetByProjectId (projectId) {
    return request.get(`/kpzh/projectExpectResults/getByProjectId/${projectId}`)
  },


  // 新增（修改）项目单位
  projectCompanyAddOrUpdate (data) {
    return request.post("/kpzh/projectCompany/addList", data)
  },
  submit (data) {
    return request.post('/kpzh/project/submit', data);
  },
  // 根据项目id和阶段类型获取项目单位信息
  projectCompanyDetailGetByProjectId (projectId, phaseType) {
    return request.get(`/kpzh/projectCompany/getByProjectId/${projectId}/${phaseType}`)
  },
  // 根据id获取所有报审审批记录
  getByBusinessId (reportTrialId) {
    return request.get(`/kpzh/approve/getByBusinessId/${reportTrialId}`);
  },
  projectExpectResultsGetByProjectIdAndPhaseType (projectId, phaseType) {
    return request.get(`/kpzh/projectExpectResults/getByProjectIdAndPhaseType/${projectId}/${phaseType}`);
  },
  projectMainContentAdd (data) {
    return request.post("/kpzh/projectMainContent/add", data)
  },

  projectMainContentUpdate (data) {
    return request.post("/kpzh/projectMainContent/update", data)
  },
  projectMainContentGetByProjectId (projectId) {
    return request.get(`/kpzh/projectMainContent/getByProjectId/${projectId}`)
  },
  projectGoalAdd (data) {
    return request.post("/kpzh/projectGoal/add", data)
  },
  projectGoalUpdate (data) {
    return request.post("/kpzh/projectGoal/update", data)
  },
  projectGoalGetByProjectId (projectId) {
    return request.get(`/kpzh/projectGoal/getByProjectId/${projectId}`)
  },
  projectPDF (id) {
    return request.post(`/kpzh/project/createPdfByWindows/${id}`, {}, {});
  },
  newProjectPDF (id) {
    return request.post(`/kpzh/popularScienceBase/createPdfByWindows/${id}`, {}, {});
  },
  myJoinList (params) {
    return request.get('/kpzh/project/myJoinList', { params })
  }
}
export default project
